<form id="edit-form" class="form-horizontal form-ajax" role="form" data-toggle="validator" method="POST" action="">
    {:token()}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Group')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_select('group[]', $groupdata, $groupids, ['class'=>'form-control selectpicker', 'multiple'=>'', 'data-rule'=>'required'])}
        </div>
    </div>
    <div class="form-group">
        <label for="username" class="control-label col-xs-12 col-sm-2">{:__('Username')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="username" name="row[username]" value="{$row.username|htmlentities}" data-rule="required;username" />
        </div>
    </div>
    <div class="form-group">
        <label for="password" class="control-label col-xs-12 col-sm-2">{:__('Password')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="password" class="form-control" id="password" name="row[password]" autocomplete="new-password" value="" data-rule="password" />
        </div>
    </div>

    <div class="form-group">
        <label for="role" class="control-label col-xs-12 col-sm-2"> 角色:</label>
        <div class="col-xs-12 col-sm-8">
            <select class="form-control selectpicker"  name="row[role]" >
                <option value="0" > 请选择</option>
                <option value="1" {if condition="$row.role eq 1"}selected{/if}> 家长</option>
                <option value="2" {if condition="$row.role eq 2"}selected{/if}> 班主任</option>
                <option value="3" {if condition="$row.role eq 3"}selected{/if}> 协管老师</option>
                <option value="4" {if condition="$row.role eq 4"}selected{/if}> 值日行政人员</option>
                <option value="5" {if condition="$row.role eq 5"}selected{/if}> 校车安全管理人员</option>
                <option value="6" {if condition="$row.role eq 6"}selected{/if}> 学校领导</option>
            </select>
        </div>
    </div>

    <div class="form-group">
        <label for="nickname" class="control-label col-xs-12 col-sm-2">{:__('Nickname')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="nickname" name="row[nickname]" autocomplete="off" value="{$row.nickname|htmlentities}" data-rule="required" />
        </div>
    </div>

    <!--<div class="form-group">
        <label for="loginfailure" class="control-label col-xs-12 col-sm-2">{:__('Loginfailure')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="number" class="form-control" id="loginfailure" name="row[loginfailure]" value="{$row.loginfailure}" data-rule="required" />
        </div>
    </div>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">线路:</label>
        <div class="col-xs-12 col-sm-8">

            <input id="c-circuit_id"  data-source="circuit/selectpage" data-multiple="true" data-field="title" class="form-control selectpage" name="row[circuit_id]" type="text" value="{$row.circuit_id}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Class_room')}:</label>
        <div class="col-xs-12 col-sm-8">

            <input id="c-class_room_id"  data-source="class_room/selectpage" data-field="title" class="form-control selectpage" name="row[class_room_id]" type="text" value="{$row.class_room_id}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Grade')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-grade" class="form-control" name="row[grade]" type="text" value="{$row.grade}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Number')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-number" class="form-control" name="row[number]" type="number" value="{$row.number}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Telephone')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-telephone" class="form-control" name="row[telephone]" type="text" value="{$row.telephone}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[status]', ['normal'=>__('Normal'), 'hidden'=>__('Hidden')], $row['status'])}
        </div>
    </div>
    <div class="form-group hidden layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
